﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class GreatAandB
{
    static void Main(string[] args)
    {
        Console.Write("Enter A = ");
        int a = Convert.ToInt32(Console.ReadLine());
        Console.Write("Enter B = ");
        int b = Convert.ToInt32(Console.ReadLine());
        double greate = ((Math.Sqrt(a*a+b*b - 2*a*b)+a+b) / 2);
        Console.WriteLine(greate);
    }
}
